<?php 
    $currentPost = $args['currentPost'] ?? [];
?>
<div class="location">
    <span class="nowrap2"><?= $currentPost['title'] ?? "" ?></span>

    <span>
        <<
            </span>
            <?php
            $category = get_the_category($currentPost['id'] ?? 0);
            if (!empty($category)) {
                $typeurl = get_category_link($category[0]->term_id);
                $typename = $category[0]->name;
                echo '<a href="' . esc_url($typeurl) . '" title="' . esc_attr($typename) . '">' . esc_html($typename) . '</a>';
            }
            ?>
            <span>
                <<
                    </span>
                    <a href="/" title="{$web_name}">الصفحة الرئيسية</a>
                    <span>الموقع الحالي </span>
</div>
<style>
    div.location {
        display: flex;
        justify-content: end;
        font-weight: bold;
        gap: var(--gap);
        background-color: var(--color-primary);
        padding: var(--gap);
    }
</style>